<template>
  <div class="mv-card">
    <div class="img-warp">
      <img class="img"
           :src="img+'?param=500y260'"
           lazy="loaded">
      <div class="play-icon">
        <i class="el-icon-video-pause">{{playCount || "..."}}</i>
      </div>
      <div class="play-icon-wrap">
        <i class="el-icon-video-pause"></i>
      </div>
      <span class="time">{{duration|durationFormat}}</span>
    </div>
    <span class="mv-name">{{title || "..."}}</span>
    <span class="artistName">{{artistName || "..."}}</span>
  </div>
</template>
<script>
export default {
  props: {
    img: String,
    playCount: Number,
    duration: Number,
    title: String,
    artistName: String
  },
  data () {
    return {
    }
  },
  created () { },
  mounted () { },
  methods: {}
}
</script>
 <style lang='less' scoped>
.mv-card {
  position: relative;
  width: 1.581259rem;
  font-size: 0.087848rem;
  cursor: pointer;
  &:hover .play-icon-wrap {
    opacity: 1;
  }
  .img-warp {
    position: relative;
    height: 0.878477rem;
    .img {
      width: 100%;
      height: 100%;
      border-radius: 0.036603rem;
      position: absolute;
      left: 0;
      top: 0;
      right: 0;
      bottom: 0;
    }
    .play-icon {
      position: absolute;
      top: 0.014641rem;
      right: 0.014641rem;
      color: #fff;
    }
    .time {
      position: absolute;
      bottom: 0.014641rem;
      right: 0.014641rem;
      color: #fff;
    }
  }
  .play-icon-wrap {
    position: absolute;
    width: 0.263543rem;
    height: 0.263543rem;
    line-height: 0.263543rem;
    text-align: center;
    font-size: 0.183016rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.3s;
    -webkit-transition: all 0.3s;
    i {
      color: red;
    }
  }
  .mv-name {
    margin-top: 0.058565rem;
    display: block;
  }
  .artistName {
    margin-top: 0.029283rem;
    color: #bebebe;
  }
}
</style>
